//
//  HTTPManager.h
//
//  Created by 孙晓奇 on 15/8/10.
//  Copyright (c) 2015年 sunny. All rights reserved.
//

typedef NS_ENUM(NSUInteger, RETURN_CODE) {
    CODE_OK                       =   0,     // 成功
    CODE_EXPIRE                   = 200,     // 验证码已过期
    CODE_VERIFY_CODE_INVALID      = 201,     // 验证码无效
    NOT_LOGIN                     = 300,     // 未登录
    INTERNAL_ERROR                = 400,     // 服务器错误
    LOGIC_EXCEPTION               = 401,     // 逻辑异常
    UNKNOWN_ERROR                 = 402,     // 未知错误
    ILLEGAL_VISIT                 = 403,     // 非法访问
};

@class FilterModel, UserModel;
@interface HTTPManager : AFHTTPRequestOperationManager

+ (instancetype)manager;

-(void)login:(UserModel *)user
     Success:(void (^)(NSDictionary *responseObject)) sucess
     failure:(void (^)(NSError *error)) failure;

-(void)getCityListWithSuccess:(void (^)(NSArray *responseObject)) sucess
                      failure:(void (^)(NSError *error)) failure;

// get office rooms
-(void)getOfficeRoomList:(FilterModel *)filter
                 success:(void (^)(NSArray *responseObject)) sucess
                 failure:(void (^)(NSError *error)) failure;

-(void)getBookingListWithStartTime:(NSDate *)startTime
                           endTime:(NSDate *)endTime
                           success:(void (^)(NSArray *responseObject)) sucess
                           failure:(void (^)(NSError *error)) failure;
@end
